<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>g2gdf - Makes Grib-2 Descriptor Files for GrADS v1.9</title>
<link rel="stylesheet" href="/pod.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:dasilva@mcjuba.home" />
</head>

<body>
<table border="0" width="100%" cellspacing="0" cellpadding="3">
<tr><td class="block" valign="middle">
<big><strong><span class="block">&nbsp;g2gdf - Makes Grib-2 Descriptor Files for GrADS v1.9</span></strong></big>
</td></tr>
</table>

<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#options">OPTIONS</a></li>
	<li><a href="#see_also">SEE ALSO</a></li>
	<li><a href="#author">AUTHOR</a></li>
	<li><a href="#copyright">COPYRIGHT</a></li>
</ul>
<!-- INDEX END -->

<hr />
<p>
</p>
<hr />
<h1><a name="name">NAME</a></h1>
<p>g2gdf - Makes Grib-2 Descriptor Files for GrADS v1.9</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
 g2gdf.pl [-h] [-0|-verf] [-o gdf_fname] [-I inv_fname]  grib2_filename   # -h for a full man page</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Uses <code>g2ctl.pl</code> and <code>wgrib2</code> to create a ctl-like file for the OpenGrADS
v1.9 extension <code>g2</code>. This extension allows the reading of Grib-2 datasets 
in GrADS v1.9.0-rc1 and later.</p>
<p>From a Grib-2 file specified on the command line this script generates
2 auxiliary text files:</p>
<dl>
<dt><strong><a name="item_file">Grib-2 Descriptor File (.gdf)</a></strong>

<dd>
<p>This is a modified version of the control (.ctl) file generated by
g2ctl. The <code>DSET</code> record is altered and the <code>OPTIONS</code> record is set
to <code>template</code> so that any attemmpt to access any variable in this
dataset returns all UNDEFs. In addition, global attributes <code>dset</code> and
<code>inventory</code> are set with the real Grib-2 and inventory file names.
The GrADS user defined extensions <code>g2open</code> and <code>g2</code> parses this file
and interfaces to the data file through the <code>wgrib2</code> utility.</p>
</dd>
</li>
<dt><strong>Inventory File (.inv)</strong>

<dd>
<p>This is a modified version of the regular inventory produced by
<code>wgrib2</code>. Here we modify the variable names to match those generated
by <code>g2ctl</code>. For example, pressure-level <code>HGT</code> is renamed to <code>HGTprs</code>.</p>
</dd>
</li>
</dl>
<p>Notice that utility <code>gribmap</code> is not used by the <code>g2</code>
extension. Therefore, there is no need to create the usual gribmap
index (<code>.idx</code>) file.</p>
<p>On input, one can specify a single Grib-2 file name or a regular GrADS
template, e.g.,</p>
<pre>
   % g2gdf.pl model.25.f%f3.grb2</pre>
<p>which produces the following output:</p>
<pre>
         Descriptor: model.25.ffff.grb2.gdf
          Inventory: model.25.ffff.grb2.inv
           Data Dir: ./
         Grib files: model.25.f000.grb2 model.25.f024.grb2 
                     model.25.f048.grb2 model.25.f072.grb2</pre>
<p>
</p>
<hr />
<h1><a name="options">OPTIONS</a></h1>
<dl>
<dt><strong><a name="item__2d0">-0</a></strong>

<dd>
<p>use analysis time (same as in g2ctl).</p>
</dd>
</li>
<dt><strong><a name="item__2dg_filename">-g <em>FILENAME</em></a></strong>

<dd>
<p>specify the name of the <strong>g2ctl</strong> utility; default is <strong>g2ctl.exe</strong> on
Cygwin, <strong>g2ctl.pl</strong> elsewhere.</p>
</dd>
</li>
<dt><strong><a name="item__2dh">-h</a></strong>

<dd>
<p>prints this message</p>
</dd>
</li>
<dt><strong><a name="item__2di_filename">-I <em>FILENAME</em></a></strong>

<dd>
<p>output inventory file name; default is derived from grib2 filename with
extension ``.inv''.</p>
</dd>
</li>
<dt><strong><a name="item__2do_filename">-o <em>FILENAME</em></a></strong>

<dd>
<p>output gdf file name; default is derived from grib2 filename with
extension ``.gdf''.</p>
</dd>
</li>
<dt><strong><a name="item__2dverf">-verf</a></strong>

<dd>
<p>uses verification time (same as in g2ctl)</p>
</dd>
</li>
<dt><strong><a name="item__2dw_filename">-w <em>FILENAME</em></a></strong>

<dd>
<p>specify the name of the <strong>wgrib2</strong> utility; default is <strong>wgrib2</strong></p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<ul>
<li>
<p><a href="http://opengrads.org/">http://opengrads.org/</a> - OpenGrADS Home Page</p>
</li>
<li>
<p><a href="http://www.iges.org/grads/">http://www.iges.org/grads/</a> - Official GrADS Home Page</p>
</li>
<li>
<p><a href="http://opengrads.org/doc/udxt/grib2/grib2.html">http://opengrads.org/doc/udxt/grib2/grib2.html</a> - The Grib-2 extension for GrADS v1.9.</p>
</li>
<li>
<p><a href="http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/">http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/</a> - Wes
Ebisuzaki's (and many co-authors) excellent <code>wgrib2</code> utility</p>
</li>
<li>
<p><a href="http://www.cpc.ncep.noaa.gov/products/wesley/g2ctl.html">http://www.cpc.ncep.noaa.gov/products/wesley/g2ctl.html</a> - Wes
Ebisuzaki's (and many co-authors) excellent <code>g2ctl</code> utility for
creating GrADS descriptor files for Grib-2 files.</p>
</li>
</ul>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>Arlindo da Silva &lt;<a href="mailto:dasilva@opengrads.org">dasilva@opengrads.org</a>&gt;</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright (c) 2006-2008 Arlindo da Silva. All rights reserved.
This program is free software; you can redistribute it and/or modify it 
under the same terms as Perl itself.</p>
<table border="0" width="100%" cellspacing="0" cellpadding="3">
<tr><td class="block" valign="middle">
<big><strong><span class="block">&nbsp;g2gdf - Makes Grib-2 Descriptor Files for GrADS v1.9</span></strong></big>
</td></tr>
</table>

</body>

</html>
